<%@ taglib uri="/WEB-INF/struts-bean.tld" 	prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" 	prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" 	prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" 	prefix="tiles" %>
<%@ taglib uri="/WEB-INF/vectrics.tld"    	prefix="vectrics" %>

<%@ page import="org.vectrics.recruiter.config.RecruitConfig" %>

<%
	String allowEmailPassword = request.getParameter("allowEmailPass");
	String newUserParam = request.getParameter("newUser");
	boolean newUser = false;
	if (newUserParam != null)
		newUser = true;
%>

<%
	if (RecruitConfig.getRecruitInstance().getDemoVersion()) {
%>
	<table width="300">
		<tr>
			<td>
				<h2>FlashRecruit Demonstration Version</h2>
				<p class="demoFont">Please use one of the following users listed below to log into this demonstration.&nbspPlease select the <i>Vectrics Inc</i> domain when logging in as the <i>Recruiting Manager</i> or <i>Recruiter</i> demonstration users.</p>
			</td>
		</tr>
	</table>
	<table width="500">
		<tr>
			<td><font class="stdBoldFont">Demo User Type</font></td>
			<td><font class="stdBoldFont">Person Name</font></td>
			<td><font class="stdBoldFont">User Name</font></td>
			<td><font class="stdBoldFont">Password</font></td>
		</tr>
		<tr>
			<td class="formBg1"><font class="stdFont">Administration User:</font></td>
			<td class="formBg1"><font class="stdFont">Admin User</font></td>
			<td class="formBg1"><font class="stdFont">admin</font></td>
			<td class="formBg1"><font class="stdFont">password</font></td>
		</tr>
		<tr>
			<td class="formBg1"><font class="stdFont">Recruiting Manager:</font></td>
			<td class="formBg1"><font class="stdFont">Paul Johnson</font></td>
			<td class="formBg1"><font class="stdFont">paul</font></td>
			<td class="formBg1"><font class="stdFont">password</font></td>
		</tr>
		<tr>
			<td class="formBg1"><font class="stdFont">Recruiter:</font></td>
			<td class="formBg1"><font class="stdFont">April Raines</font></td>
			<td class="formBg1"><font class="stdFont">april</font></td>
			<td class="formBg1"><font class="stdFont">password</font></td>
		</tr>
	</table>
<% } %>

<% if (newUser) { %>
	<p class="errorFont"><bean:message key="prompt.login.account.est"/></p>
<% } %>
	
	
<% if (request.getParameter("error") != null) { %>
	<p class="errorFont"><bean:message key="prompt.login.bad"/></p>
<% } %>	

<% if (( request.getSession().getAttribute("accessError") != null ) || (request.getParameter("accessError") != null) ){ %>
	<p class="errorFont"><bean:message key="prompt.privilege.access.bad"/></p>
<% } %>	

<form action="submitCredentials.do" method="post" name="fm" id="login.form">
	<% if (request.getParameter("error") != null) { %>
		<input type="hidden" name="loginRetry" value="true"/>
	<% } %>	

	<table cellpadding="1" cellspacing="0">
		<tr>
			<td class="formBg2" valign="top">
				<font class="formLabelClass"><bean:message key="prompt.login.user"/></font>
			</td>
			<td class="formBg2" valign="top">
				<input value="" class="formEditClass" id="username" name="username" type="text">
			</td>
		</tr>

		<tr>
			<td class="formBg1" valign="top">
				<font class="formLabelClass"><bean:message key="prompt.login.password"/></font>
			</td>
			<td class="formBg1" valign="top">
				<input value="" class="formEditClass" name="password" type="password">
			</td>
		</tr>

		<tr>
			<td class="formBg2" valign="top">
				<font class="formLabelClass"><bean:message key="prompt.domain"/></font>
			</td>
			<td class="formBg2" valign="top">
				<vectrics:domainCombo 
					property="domainId"
					styleClass="formComboClass"	/>
			</td>
		</tr>
		
		
		<tr>
			<td class="formBg1" valign="TOP" align="left"></td>
			<td class="formBg1" valign="TOP" align="left">
				<vectrics:formButton code="button.ok" phraseCode="prompt.login.submit" value="submit" name="submit" elementId="login.submit"/>
			</td>
		</tr>
	</table>
</form>

<script type="text/javascript" language="JavaScript">
  <!--
	 var focusControl = document.getElementById("username");
     focusControl.focus();
 
  // -->
</script>


